home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 October / EnigmA AMIGA RUN 31 (1998)(G.R. Edizioni)(IT)[!][issue 1998-10].iso / earkit / chat / amarquee / include / amiga / clib / amarquee_protos.h
C/C++ Source or Header  |  1998-09-22  |  3KB  |  73 lines

  1. #ifndef AMARQUEE_PROTOS_H
  2. #define AMARQUEE_PROTOS_H
  3.  
  4. #include <rexx/storage.h>
  5.  
  6. #ifndef AMARQUEE_H
  7. #include <libraries/Amarquee.h>
  8. #endif
  9.  
  10. #ifdef __SASC_60
  11. #define LibCall libcall
  12. #else
  13. #define LibCall __geta4 __regargs
  14. #endif
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. /* Open or close a connection */
  21. extern LibCall struct QSession * QNewSession(char * hostname, LONG port, char * progname);  /* returns socket descriptor */
  22. extern LibCall struct QSession * QNewSessionAsync(char * hostname, LONG port, char * progname);  /* returns socket descriptor */
  23. extern LibCall LONG QFreeSession(struct QSession * session);
  24.  
  25. /* Transactions--these return their transaction ID #, or zero on no memory. */
  26. extern LibCall LONG QDebugOp(struct QSession * session, char * string);
  27. extern LibCall LONG QGetOp(struct QSession * session, char * wildpath, LONG maxBytes);
  28. extern LibCall LONG QDeleteOp(struct QSession * session, char * wildpath);
  29. extern LibCall LONG QRenameOp(struct QSession * session, char * path, char * label);
  30. extern LibCall LONG QSubscribeOp(struct QSession * session, char * wildpath, LONG maxBytes);
  31. extern LibCall LONG QSetOp(struct QSession * session, char * path, void * buffer, ULONG bufferLength);
  32. extern LibCall LONG QClearSubscriptionsOp(struct QSession * session, LONG which);
  33. extern LibCall LONG QPingOp(struct QSession * session);
  34. extern LibCall LONG QInfoOp(struct QSession * session);
  35. extern LibCall LONG QSetAccessOp(struct QSession * session, char * newAccess);
  36. extern LibCall LONG QGo(struct QSession * session, ULONG flags);
  37.  
  38. /* Call this function to free your QMessage! */
  39. extern LibCall void FreeQMessage(struct QSession * session, struct QMessage * qmsg);
  40.  
  41. /* Use this to open a host QSession to receive connections on. */
  42. extern LibCall struct QSession * QNewHostSession(char * hostnames, LONG * port, char * progNames);
  43. extern LibCall LONG QStreamOp(struct QSession * session, char * path, void * buffer, ULONG bufferLength);
  44. extern LibCall struct QSession * QNewServerSession(char * hostNames, char * progNames);
  45.  
  46. extern LibCall LONG QSetMessageAccessOp(struct QSession * session, char * newAccess, LONG maxBytes);
  47. extern LibCall LONG QMessageOp(struct QSession * session, char * hosts, void * buffer, ULONG bufferLength);
  48.  
  49. extern LibCall ULONG QNumQueuedPackets(struct QSession * session);
  50. extern LibCall ULONG QNumQueuedBytes(struct QSession * session);
  51.  
  52. extern LibCall char * QErrorName(LONG error);
  53.  
  54. /* Administrative calls, introduced for v1.45 */
  55. extern LibCall LONG QRequestPrivilegesOp(struct QSession * session, ULONG privBits);
  56. extern LibCall LONG QReleasePrivilegesOp(struct QSession * session, ULONG privBits);
  57. extern LibCall LONG QKillClientsOp(struct QSession * session, char * hosts);
  58. extern LibCall LONG QSetParameterOp(struct QSession * session, char * paramName, char * newValue);
  59. extern LibCall LONG QGetParameterOp(struct QSession * session, char * paramName);
  60. extern LibCall LONG QSysMessageOp(struct QSession * session, char * hosts, char * message);
  61.  
  62. /* Convenience method, introduced for v1.46 */
  63. extern LibCall LONG QGetAndSubscribeOp(struct QSession * session, char * wildpath, LONG maxBytes);
  64.  
  65. /* Introduced for v1.47, to support sharing QSessions between threads */
  66. extern LibCall BOOL QDetachSession(struct QSession * session, ULONG flags);
  67. extern LibCall BOOL QReattachSession(struct QSession * session, ULONG flags);
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #endif /* AMARQUEE_PROTOS_H */